﻿<UserControl x:Class="TestApp.RegistrySample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:TestApp"
	xmlns:tree="clr-namespace:Aga.Controls.Tree;assembly=Aga.Controls">
    <UserControl.Resources>
        <local:RegImageConverter x:Key="RegImageConverter"/>
    </UserControl.Resources>

    <StackPanel>
        <tree:TreeList Name="_tree">
            <tree:TreeList.View>
                <GridView>
                    <GridView.Columns>

                        <GridViewColumn Width="400" Header="Name">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <tree:RowExpander/>
                                        <Image Source="{Binding Converter={StaticResource RegImageConverter}}"  Margin="0, 0, 5, 0"/>
                                        <TextBlock Text="{Binding Name}"></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>

                        <GridViewColumn Header="Type" Width="50" DisplayMemberBinding="{Binding Kind}"/>
                        <GridViewColumn Header="Data" Width="100" DisplayMemberBinding="{Binding Data}"/>

                    </GridView.Columns>
                </GridView>
            </tree:TreeList.View>
        </tree:TreeList>
        <Button Content="Button" Click="Button_Click"/>
    </StackPanel>
</UserControl>
